import { Component, OnInit } from '@angular/core';
import {RequestService} from '../../service/request.service';
import {apis} from '../../data/apis/pokemon';

@Component({
  selector: 'app-index',
  templateUrl: './index.component.html',
  styleUrls: ['./index.component.scss']
})
export class IndexComponent implements OnInit {

  public _search_condition: any = {
    Size: 10,
    Page: 1,
    Conditions: [],
    Orders: [
      {
        column: 'Id',
        rule: 'asc'
      }
    ]
  }
  constructor(private request: RequestService) { }

  ngOnInit(): void {
     this._getList().then();
  }
  async _getList() {
    const res = await this.request.post({url: apis.查询, data: this._search_condition, successMsg: null})
    console.log(res)
    // this.res_obj = res
  }

}
